package com.bhs.sansong.adapter;

import android.widget.ImageView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.bhs.sansong.R;
import com.bhs.sansong.bean.VideoDataBean;
import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

public class MoreVideoAdapter extends BaseQuickAdapter<VideoDataBean, BaseViewHolder> {

    public MoreVideoAdapter(@Nullable List<VideoDataBean> data) {
        super(R.layout.item_more_video, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, VideoDataBean item) {
        Glide.with(mContext).load(item.getCover()).into((ImageView) helper.getView(R.id.iv_cover));
        helper.setText(R.id.tv_title, item.getTitle());
        helper.setGone(R.id.tv_play, item.isPlay());
    }
}
